home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-serious-
/
graphics
/
gnuplot
/
gnuplot-3.7.1src
/
gnuplot-3.7.1
/
commitvers
< prev
next >
Wrap
Text File
|
1999-11-29
|
1KB
|
55 lines
#! /usr/bin/perl
#
# $Id: commitvers,v 1.1.1.1 1998/04/15 19:16:28 lhecking Exp $
#
# update version.c and commit gnuplot
#
# this file will not be in any official release
#
if( ! -f "version.c" ) {
die "Doesn't look like a gnuplot dir to me\n";
}
rename("version.c",".#version.c") || die "Can't move version.c\n";
open(IN, ".#version.c") || die "Can't open version.c.\n";
open(OUT, ">version.c") || die "Can't create version.c\n";
$major="";
$minor="";
while(<IN>) {
if( /Id: version\.c,v ([0-9]+)\.([0-9]+) / ) {
$major=$1;
$minor=$2;
}
if( /^(.*patchlevel.*")(alpha |beta |)[^"]*(".*)$/ ) {
die if( $major eq "" || $minor eq "");
printf OUT "$1$2%d$3\n", $minor+1;
} elsif ( /^(.*date.*")[^"]*(".*)$/ ) {
$date=`date`;
chop $date;
print OUT "$1$date$2\n";
} else {
print OUT;
}
}
close IN;
close OUT;
$minor++;
print "New version is $major.$minor\n";
# check in configure.in first, so that we get the new revision number into
# configure
if(system("cvs diff configure.in >/dev/null")) {
system("cvs commit configure.in");
system("autoconf");
}
system("cvs commit");